#!/bin/sh

USAGE="Usage: $0 <Command> [options] files\nThe <Command> can be one of the following: Compress, Convert, Decrypt, Diff, Embed, Encrypt, Extract, Impose, Info, Markup, Merge, Repair, Split, Stamp, Uncompact, Uncompress, Undo, Validate\nFor possible options see documentations in /usr/doc/multivalent-tool-pdf-@VERSION@/tool-pdf-doc/"
if [ "$#" == "0" ]; then
  echo -e "$USAGE"
  exit 1
fi

CMD="$1"

shift

case $CMD in
  Compress|Convert|Decrypt|Diff|Embed|Encrypt|Extract|Impose|Info|Markup|Merge|Repair|Split|Stamp|Uncompact|Uncompress|Undo|Validate)
    exec java -classpath /usr/share/java/Multivalent20060102.jar tool.pdf.$CMD "$@"
    ;;
  *)
    echo -e "$USAGE"
    exit 1
esac
